package cn.com.yusys.yusp.admin.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;

import cn.com.yusys.yusp.admin.domain.SModifyTrace;
import cn.com.yusys.yusp.admin.repository.mapper.SModifyTraceMapper;
import cn.com.yusys.yusp.commons.mapper.QueryModel;


@Service
public class SModifyTraceService {
    
    @Autowired
    private SModifyTraceMapper sModifyTraceMapper;
    
    /**
     * 
     * @方法名称:selectSModifyTraceByPk
     * @方法描述:根据条件查询所有修改记录
     * @参数与返回说明:
     * @算法描述:
     */
    public List<SModifyTrace> selectSModifyTraceByPk(QueryModel model){ 
    	List<SModifyTrace> list=sModifyTraceMapper.selectSModifyTraceByPk(model);    
    	return list;
    }
    
    /**
     * 
     * @方法名称:selectSMTraceWithPage
     * @方法描述:根据条件查询所有修改记录（分页）
     * @参数与返回说明:
     * @算法描述:
     */
    public List<SModifyTrace> selectSMTraceWithPage(QueryModel model){ 
        PageHelper.startPage(model.getPage(), model.getSize());
        List<SModifyTrace> list=sModifyTraceMapper.selectSModifyTraceByPk(model);   
        PageHelper.clearPage();
        return list;
    }

    public Boolean addSModifyTrace(SModifyTrace sModifyTrace) {
        // TODO Auto-generated method stub
        int i=sModifyTraceMapper.insertSelective(sModifyTrace);
        return i>0;
    }

    public int insertBatchSModifyTrace(List<SModifyTrace> list) {
        // TODO Auto-generated method stub
        int result=sModifyTraceMapper.insertBatchSModifyTrace(list);
        return result;
    }
    
    
    
}
